package com.kgc.warehouse.system.common;

public enum CodeMsg {

    SUCCESS("操作成功",0),
    LOGIN_SUCCESS("登录成功",0),
    FAIL("操作失败",500),

    CAPTCHA_EXPIRE("验证码失效",1001),
    CAPTCHA_ERROR("验证码错误",1002),

    USERNAME_NOT_EXIST("用户名不存在",2001),
    USERNAME_EXIST("用户名已存在",2002),
    PASSWORD_ERROR("密码错误",2003),
    USER_LOCKED("用户被禁用",20004),
    ROLE_EXIST("角色已存在",3001),
    ROLE_HASUSED("角色被占用",30002),
    PERMISSION_USED("权限含有子选项,不能删除",60001),
    PERMISSION_EXIT("此目录下已存在该权限,不能添加",60001),
    DEPT_EXIT("此父级部门下已有该子部门,不能添加",60001),
    CHILD_DEPT_EXIT("此父级部门下有子部门,无法删除",60002),
    DEPT_HASUSER("此部门非空部门,无法删除",60001),
    IS_MENU("此为菜单无需添加权限标识",7001),
    IS_PERMISSION("此为按钮,无需添加菜单路径",7002),
    PERMISSION_ERRO("权限类型与菜单URL或权限标识不匹配",7003),
    USER_NO_AUTHORIZATION("没有权限，请联系管理员",403),
    DELETE_SUCCESS("删除成功",200),
    DELETE_FAIL("删除失败",500),
    ADD_SUCCESS("添加成功",200),
    ADD_FAIL("添加失败",500),
    UPDATE_SUCCESS("更新成功",200),
    UPDATE_FAIL("更新失败",500),
    BACKINPORT_SUCCESS("退货成功",200),
    BACKINPORT_FAIL("退货失败",500),
    IMG_UPLOAD_SUCCESS("图片上传成功",200),
    IMG_UPLOAD_FAIL("图片上传失败",500),
    RESET_PWD("密码重置成功",0),
    OLEPWD_ERRO("原密码输入错误",80001),
    AGAINNEW_ERRO("新密码输入不一致",80002),
    USER_IS_LOGIN("当前用户已经在其他设备登陆，登录将把其他设备账号挤下线",0),
    NUMBER_UNLEGAL("进货数量必须大于50",80003),
    NUMBER_OVER("已达库存预警值",80004),
    NUMBER_ISNULL("库存不足",80005),
    NUMBER_SALECOUNT("销售数量必须大于50",80006),
    NUMBER_SALECOUNTS("销售数量必须大于0",80007),



    ;

    private String msg;
    private Integer code;


    CodeMsg(String msg,Integer code)
    {
        this.code=code;
        this.msg=msg;
    }

    public String getMsg() {
        return msg;
    }

    public Integer getCode() {
        return code;
    }
}
